package com.demon.framework.boot.job;

import com.alibaba.fastjson.JSON;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import org.quartz.Job;

/**
 * 定时任务 抽象类
 *
 * @author Demon-HY
 * @date 2020/7/24 16:44
 */
@Getter
@Setter
@AllArgsConstructor
public abstract class AbstractTask {
    /**
     * 任务的ID标识
     */
    private String id;

    protected abstract Class<? extends Job> getJobClass();

    protected abstract String getJobGroup();

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }
}
